package com.j4dream.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import com.j4dream.jizhang.R;


public class MainActivity extends Activity {

    private Button btnDetail;
    private Button btnAddDetailItem;
    private Button btnAccount;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_main);

        btnDetail = (Button)findViewById(R.id.main_btn_detail);
        btnDetail.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent detailIntent = new Intent(MainActivity.this,
                        AddDetailItemActivity.class);
                MainActivity.this.startActivity(detailIntent);
            }
        });

        btnAddDetailItem=(Button)findViewById(R.id.main_btn_add_detail_item);
        btnAddDetailItem.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent addDetailItemIntent = new Intent(MainActivity.this,
                        AddDetailItemActivity.class);
                MainActivity.this.startActivity(addDetailItemIntent);
            }
        });

        btnAccount=(Button)findViewById(R.id.main_btn_account);
        btnAccount.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent listDetailItemActivity = new Intent(MainActivity.this,
                        ListDetailItemActivity.class);
                MainActivity.this.startActivity(listDetailItemActivity);
            }
        });
    }
}
